<extend name="Base/common" />
<block name="body">
  <!-- 标签页导航 -->
  <div class="span9 page_message">
    <section id="contents">
      <ul class="tab-nav nav">
        <li class=""><a href="{:U('lists')}">大转盘列表</a></li>
        <li class="current"><a href="javascript:;">编辑大转盘<b class="arrow fa fa-sort"></b></a></li>
      </ul>
      <div class="tab-content"> 
        <!-- 表单 -->
        <form id="form" action="{:U('edit?model='.$model['id'])}" method="post" class="form-horizontal">
          <ul id="tab" class="tab-pane in">
            	 <li class="form-item cf">
                    <label class="item-label"><span class="need_flag">*</span>关键词<span class="check-tips"></span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="keyword" value="{$data.keyword}">
                    </div>
                  </li>  
                   <li class="form-item cf">
                    <label class="item-label"><span class="need_flag">*</span>活动标题<span class="check-tips"></span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="title" value="{$data.title}">
                    </div>
                  </li>  
                  <li class="form-item cf">
                  		<label class="item-label"><span class="need_flag">*</span>封面图片<span class="check-tips">图片高度控制在200px-400px之间</span></label>
                		<div class="controls uploadrow2" title="点击修改图片" rel="picurl">
                            <input type="file" id="upload_picture_picurl">
                            <input type="hidden" name="picurl" id="cover_id_picurl" value="{$data.picurl}"/>
                            <div class="upload-img-box" rel="img">
                              <notempty name="data[picurl]">
                                <div class="upload-pre-item2"><img width="100" height="100" src="{$data.picurl|get_cover_url}"/></div>
                                <em class="edit_img_icon">&nbsp;</em>
                              </notempty>
                            </div>
                      </div>
                  </li>
                  
                  <li class="form-item cf">
                    <label class="item-label"><span class="need_flag">*</span>活动介绍<span class="check-tips"></span></label>
                    <div class="controls">
                      <label class="textarea input-large">
                      <textarea class="text input-large" name="des_jj" >{$data.des_jj}</textarea>
                      </label>
                    </div>
                  </li> 
                  <li class="form-item cf">
                    <label class="item-label"><span class="need_flag">*</span>活动规则<span class="check-tips"></span></label>
                    <div class="controls">
                      <label class="textarea input-large">
                      <textarea class="text input-large" name="guiz" >{$data.guiz}</textarea>
                      </label>
                    </div>
                  </li>   
                  <div class="controls">
                    <label class="item-label">
                           每日抽奖次数 <span class="check-tips">（0表示不限制）</span>
                    </label>
                    <input type="text" name="choujnum" class="text input-large" value="{$data.choujnum}"/>
                 </div>
                 
                  
                  <li class="form-item cf">
                    <label class="item-label"><span class="need_flag">*</span>有效期<span class="check-tips"></span></label>
                    <div class="controls">
                       <input type="datetime" name="start_date" class="text time" value="{$data.start_date|time_format}" placeholder="请选择时间" /> - 
                       <input type="datetime" name="end_date" class="text time" value="{$data.end_date|time_format}" placeholder="请选择时间" />
                    </div>
                  </li>   
                  
                  
                    
               	</ul>
          </div>
          <div class="form-item form_bh">
            <input type="hidden" name="id" value="{$data.id}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
          </div>
        </form>
       
      </div>
    </section>
  </div>
  </div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<php>
if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script> 
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js?v={:SITE_VERSION}" charset="UTF-8"></script> 
<script type="text/javascript">
$(function(){ 
   initUploadImg();
});
$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
    $('.time').datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        language:"zh-CN",
        minView:0,
        autoclose:true
    });
    showTab();
});
</script>
</block>
